import axios from '../utils/axios'
//添加商品至购物车
export function addCart(params){
  return axios.post('/shop-cart', params);
}
//修改购物车中的商品
export function modifyCart(params){
  return axios.put('/shop-cart', params);
}
//获取购物车信息
export function getCart(params){
  return axios.get('/shop-cart', { params });
}
//删除购物车单项商品
export function deleteCartItem(id){
  return axios.delete(`/shop-cart/${id}`);
}
//根据id获取购物车内的商品信息
export function getByCartItemIds(params){
  return axios.get('/shop-cart/settle', { params });
}